import { useUserInfoStore } from "@/stores/userInfo";
import pinia from "@/stores/index";
const UserInfoStore = useUserInfoStore(pinia);
//按钮权限自定义指令
export const has = (app: any) => {
  app.directive("btton-iscan", {
    /* 自定义指令钩子 */
    mounted(ele: any, option: any) {
      //dom挂载调用

      if (!UserInfoStore.$state.buttonIsCanList.includes(option.value)) {
        ele.parentNode.removeChild(ele);
      }
    },
  });
};
